package com.bm.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ejyy_ask_for_leave_flow
 */
@TableName(value ="ejyy_ask_for_leave_flow")
@Data
public class EjyyAskForLeaveFlow implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long parentId;

    /**
     * 
     */
    private Integer step;

    /**
     * 
     */
    private Byte nodeType;

    /**
     * 
     */
    private Long workflowNodeId;

    /**
     * 
     */
    private Boolean applicantAssign;

    /**
     * 
     */
    private Long relationUserId;

    /**
     * 
     */
    private Boolean finish;

    /**
     * 
     */
    private String refuseReason;

    /**
     * 
     */
    private Long finishedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EjyyAskForLeaveFlow other = (EjyyAskForLeaveFlow) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
            && (this.getStep() == null ? other.getStep() == null : this.getStep().equals(other.getStep()))
            && (this.getNodeType() == null ? other.getNodeType() == null : this.getNodeType().equals(other.getNodeType()))
            && (this.getWorkflowNodeId() == null ? other.getWorkflowNodeId() == null : this.getWorkflowNodeId().equals(other.getWorkflowNodeId()))
            && (this.getApplicantAssign() == null ? other.getApplicantAssign() == null : this.getApplicantAssign().equals(other.getApplicantAssign()))
            && (this.getRelationUserId() == null ? other.getRelationUserId() == null : this.getRelationUserId().equals(other.getRelationUserId()))
            && (this.getFinish() == null ? other.getFinish() == null : this.getFinish().equals(other.getFinish()))
            && (this.getRefuseReason() == null ? other.getRefuseReason() == null : this.getRefuseReason().equals(other.getRefuseReason()))
            && (this.getFinishedAt() == null ? other.getFinishedAt() == null : this.getFinishedAt().equals(other.getFinishedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getStep() == null) ? 0 : getStep().hashCode());
        result = prime * result + ((getNodeType() == null) ? 0 : getNodeType().hashCode());
        result = prime * result + ((getWorkflowNodeId() == null) ? 0 : getWorkflowNodeId().hashCode());
        result = prime * result + ((getApplicantAssign() == null) ? 0 : getApplicantAssign().hashCode());
        result = prime * result + ((getRelationUserId() == null) ? 0 : getRelationUserId().hashCode());
        result = prime * result + ((getFinish() == null) ? 0 : getFinish().hashCode());
        result = prime * result + ((getRefuseReason() == null) ? 0 : getRefuseReason().hashCode());
        result = prime * result + ((getFinishedAt() == null) ? 0 : getFinishedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", parentId=").append(parentId);
        sb.append(", step=").append(step);
        sb.append(", nodeType=").append(nodeType);
        sb.append(", workflowNodeId=").append(workflowNodeId);
        sb.append(", applicantAssign=").append(applicantAssign);
        sb.append(", relationUserId=").append(relationUserId);
        sb.append(", finish=").append(finish);
        sb.append(", refuseReason=").append(refuseReason);
        sb.append(", finishedAt=").append(finishedAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}